import axios from "axios"
const instance=axios.create({
    baseURL:"http://kumanxuan1.f3322.net:8360",
    timeout:15000
})
instance.interceptors.request.use(config=>{
    let token=localStorage.getItem("token")
    if(token){
        config.headers["X-Nideshop-Token"] = token;
    }
    return config
},err=>{
    return Promise.reject(err)
})
instance.interceptors.response.use(data=>{
   
    return data.data
},err=>{
    return Promise.reject(err)
})
export default instance